﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
	String path = request.getContextPath();
	String basePath = "/";
%>
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>三农活动统计</title>
<style>
.activity-overall {
	
}

.activity-list {
	list-style: none;
	width: 100%;
	padding: 0;
}

.activity-list:after {
	content: '';
	display: block;
	clear: both;
}

.activity-li {
	float: left;
	width: 31%;
	height: 190px;
	text-align: center;
	border: 1px solid #000;
	margin-right: 20px;
	margin-bottom: 10px;
}

.activity-li p {
	margin-top: 20px;
	margin-bottom: 20px;
}

.number {
	color: red;
	font-size: 20px;
}
.activity-overall-title{
    margin-left: 25px;
    margin-bottom: 20px;
font-size:24px;
padding:10px 0;
border-bottom:1px solid #333;
}
</style>
<base href="/">
<!-- 下拉框 -->
<link rel="stylesheet" href="static/ace/css/chosen.css" />
<!-- jsp文件头和头部 -->
<%@ include file="../../system/index/top.jsp"%>
<!-- 日期框 -->
<link rel="stylesheet" href="static/ace/css/datepicker.css" />
<link rel="stylesheet" href="static/styles/base.css"/>
</head>

<body>
	<form action="count/listCount" method="post" name="userForm" id="userForm">
		<table class="ml20" style="margin-top: 5px;">
			<tr>
				<td class="zdyTime" style="padding-left:5px;"> <input class="span10 date-picker" name="LongTerm" id="LongTerm" value="${pd.LongTerm}" type="text" style="width:88px;" placeholder="选择月份"  title="选择月份"/></td>
				<td class="center" style="padding-left: 5px;">自定义时间</td>
				<td class="input-daterange">
					<div class="dib vm pl5">
						<input class="span10 date-picker" name="startTime" id="startTime"
							value="${pd.startTime}" type="text" style="width: 88px;"
							placeholder="选择日期" title="选择日期" />
					</div>
					<div class="dib vm pl5">至</div>
					<div class="dib vm pl5">
						<input class="span10 date-picker" name="endTime" id="endTime"
							value="${pd.endTime}" type="text" style="width: 88px;"
							placeholder="选择日期" title="选择日期" />
					</div>
				</td>
				<c:if test="${QX.cha == 1 }">
					<td style="vertical-align: top; padding-left: 2px;"><a
						class="btn btn-light btn-xs" onclick="searchs();" title="检索"><i
							id="nav-search-icon"
							class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a>
					</td>
				</c:if>
			</tr>
		</table>
		<div class="activity-overall">
			<div class="activity-overall-title">销售情况</div>
			<ul class="activity-list">
				<li class="activity-li">
					<p>总销售额</p>
					<div class="mt20 mb20" style="padding:5px 0;">
						<p class="number">${count}&nbsp;元</p>
					</div>
					<a href="<%=basePath%>count/getSanNongSaleslist.do">查看详情</a>
				</li>
				<c:forEach items="${sanNongGoodsList}" var="sanNong"
					varStatus="status">
					<li class="activity-li">
						<p>${sanNong.title}</p>
						<p class="number">销售 ${sanNong.num} ${sanNong.unit}</p>
						<p class="number">销售总额 ${sanNong.price} 元</p> 
						<a href="<%=basePath%>count/getSanNongSaleslist.do?goodsId= ${sanNong.goods_id}">查看详情</a>
					</li>
				</c:forEach>
			</ul>
		</div>
		<div class="activity-overall">
		<div class="activity-overall-title">奖励情况</div>
			<ul class="activity-list">
				<li class="activity-li">
					<p>直推现金奖励</p>
					<p class="number">${directPush}&nbsp;元</p> 
					<a href="<%=basePath%>count/getSanNongRewardlistPage.do?type=02&subType=01">查看详情</a>
				</li>
				<li class="activity-li">
					<p>间推现金奖励</p>
					<p class="number">${push}&nbsp;元</p> 
					<a href="<%=basePath%>count/getSanNongRewardlistPage.do?type=02&subType=02">查看详情</a>
				</li>
				<li class="activity-li">
					<p>见点现金奖励</p>
					<p class="number">${seePoint}&nbsp;元</p> 
					<a href="<%=basePath%>count/getSanNongRewardlistPage.do?type=02&subType=03">查看详情</a>
				</li>
				<li class="activity-li">
					<p>管理费</p>
					<p class="number">${managementFee}&nbsp;元</p> 
					<a href="<%=basePath%>count/getSanNongRewardlistPage.do?type=00&subType=00">查看详情</a>
				</li>
				<li class="activity-li">
					<p>粮票</p>
					<p class="number">${tickercount}&nbsp;元</p> 
					<a href="<%=basePath%>count/getSanNongRewardlistPage.do?rewardType=1">查看详情</a>
				</li>
				<li class="activity-li">
					<p>复投</p>
					<p class="number">${reinvestment}&nbsp;元</p> 
					<a href="<%=basePath%>count/getSanNongRewardlistPage.do?type=00&subType=01"">查看详情</a>
				</li>
				<li class="activity-li">
					<p>平台结余</p>
					<p class="number">${platform}&nbsp;元</p>
				</li>
			</ul>
		</div>
	</form>
	<!-- 页面底部js¨ -->
	<%@ include file="../../system/index/foot.jsp"%>
	<!-- 删除时确认窗口 -->
	<script src="static/ace/js/bootbox.js"></script>
	<!-- ace scripts -->
	<script src="static/ace/js/ace/ace.js"></script>
	<!-- 日期框 -->
	<script src="static/ace/js/date-time/bootstrap-datepicker.js"></script>
	<!-- 下拉框 -->
	<script src="static/ace/js/chosen.jquery.js"></script>
	<script
		src="https://cdn.bootcss.com/Chart.js/2.7.2/Chart.bundle.min.js"></script>
	<!--提示框-->
	<script type="text/javascript" src="static/js/jquery.tips.js"></script>
	<script type="text/javascript"
		src="https://chartjs.bootcss.com/samples/utils.js"></script>
</body>
<script type="text/javascript">
	$(top.hangge());
	
	var spanDateFormat = 'yyyy-mm-dd';
    $('.input-daterange').datepicker({
    	  autoclose: true,
    	  format: "yyyy-mm-dd",
    	  maxViewMode: 0,
    	});
    
    $(".zdyTime input").datepicker({
   	 format: "yyyy-mm",
   	 startView: 1,
   	 minViewMode: 1,
   	 maxViewMode: 2,
   	 language: "zh-CN",
   	 autoclose: true
	});
    
	$(function() {
		$('.date-picker').datepicker({
			autoclose : true,
			todayHighlight : true
		});
	})
	function times(ids) {
		$("#times").val(ids);
		$("#userForm").submit();
	}
	function searchs() {
		$("#userForm").submit();
	}
</script>
</html>
